package com.hzbank.generate;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@Slf4j
@MapperScan("com.hzbank.generate.mapper")
@SpringBootApplication
public class GenerateApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(GenerateApplication.class, args);
        log.info("\n----------------------------------------------------------\n\t" +
                "Application is running! Access URLs:\n\t" +
                "Local: \t\thttp://localhost:8080" +"\n\t" +
                "----------------------------------------------------------");
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(GenerateApplication.class);
    }
}
